package Control;

import Boundary.Student_Login;
import Control.Service.StudentService;
import Entity.Student;
import Control.Service.impl.StudentServiceImpl;

import javax.swing.*;
import java.awt.*;

/**
 *Title: Control.java
 *Description: This class is created as the entry point to the Java application
 * @author Group 77
 * @version 4.0
 * @description start the whole program from main()
 */
public class Control {
    public static Student student;


    public static JSONController json1=new JSONController("modules.json");

    public static JSONController json2=new JSONController("achievements.json");

    public static JSONController json3=new JSONController("role.json");

    public static JSONController json0=new JSONController("student.json");

    /**
     * ss is the instance of the interface CustomerService
     */
    public static StudentService ss = new StudentServiceImpl();



    public static void Add_Component(JFrame jfr,GridBagLayout gbl,Component comp,GridBagConstraints gbc,int gridx,int gridy,int gridheight,int gridwidth,double weight_x,double weight_y)
    {
        gbc.weightx=weight_x;
        gbc.weighty=weight_y;
        gbc.gridheight=gridheight;
        gbc.gridwidth=gridwidth;
        gbc.gridx=gridx;
        gbc.gridy=gridy;
        gbl.setConstraints(comp, gbc);
        jfr.add(comp);
    }
    /**
     * start the whole program
     */
    public static void main(String[] args){
        Student_Login jfr= new Student_Login();
    }


}
